<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - jQuery.rdf.pattern</title>

		<style type="text/css">
			/* default.css */
body
{
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
	width: 800px;
}

.header
{
	clear: both;
	background-color: #ccc;
	padding: 8px;
}

h1
{
	font-size: 150%;
	font-weight: bold;
	padding: 0;
	margin: 1em 0 0 .3em;
}

hr
{
	border: none 0;
	border-top: 1px solid #7F8FB1;
	height: 1px;
}

pre.code
{
	display: block;
	padding: 8px;
	border: 1px dashed #ccc;
}

#index
{
	margin-top: 24px;
	float: left;
	width: 160px;
	position: absolute;
	left: 8px;
	background-color: #F3F3F3;
	padding: 8px;
}

#content
{
	margin-left: 190px;
	width: 600px;
}

.classList
{
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 8px;
	font-family: arial, sans-serif;
	font-size: 1em;
	overflow: auto;
}

.classList li
{
	padding: 0;
	margin: 0 0 8px 0;
}

.summaryTable { width: 100%; }

h1.classTitle
{
	font-size:170%;
	line-height:130%;
}

h2 { font-size: 110%; }
caption, div.sectionTitle
{
	background-color: #7F8FB1;
	color: #fff;
	font-size:130%;
	text-align: left;
	padding: 2px 6px 2px 6px;
	border: 1px #7F8FB1 solid;
}

div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }

.summaryTable td
{
	vertical-align: top;
	padding: 4px;
	border-bottom: 1px #7F8FB1 solid;
	border-right: 1px #7F8FB1 solid;
}

/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
	border-left: 1px #7F8FB1 solid;
	width: 140px;
	text-align: right;
}

td.attributes, .fixedFont
{
	line-height: 15px;
	color: #002EBE;
	font-family: "Courier New",Courier,monospace;
	font-size: 13px;
}

.summaryTable td.nameDescription
{
	text-align: left;
	font-size: 13px;
	line-height: 15px;
}

.summaryTable td.nameDescription, .description
{
	line-height: 15px;
	padding: 4px;
	padding-left: 4px;
}

.summaryTable { margin-bottom: 8px; }

ul.inheritsList
{
	list-style: square;
	margin-left: 20px;
	padding-left: 0;
}

.detailList {
	margin-left: 20px; 
	line-height: 15px;
}
.detailList dt { margin-left: 20px; }

.detailList .heading
{
	font-weight: bold;
	padding-bottom: 6px;
	margin-left: 0;
}

.light, td.attributes, .light a:link, .light a:visited
{
	color: #777;
	font-style: italic;
}

.fineprint
{
	text-align: right;
	font-size: 10px;
}
		</style>
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/jQuery.html">jQuery</a></li>
	
	<li><a href="../symbols/jQuery.rdf.html">jQuery.rdf</a></li>
	
	<li><a href="../symbols/jQuery.rdf.blank.html">jQuery.rdf.blank</a></li>
	
	<li><a href="../symbols/jQuery.rdf.databank.html">jQuery.rdf.databank</a></li>
	
	<li><a href="../symbols/jQuery.rdf.literal.html">jQuery.rdf.literal</a></li>
	
	<li><a href="../symbols/jQuery.rdf.pattern.html">jQuery.rdf.pattern</a></li>
	
	<li><a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a></li>
	
	<li><a href="../symbols/jQuery.rdf.rule.html">jQuery.rdf.rule</a></li>
	
	<li><a href="../symbols/jQuery.rdf.ruleset.html">jQuery.rdf.ruleset</a></li>
	
	<li><a href="../symbols/jQuery.rdf.triple.html">jQuery.rdf.triple</a></li>
	
	<li><a href="../symbols/jQuery.typedValue.html">jQuery.typedValue</a></li>
	
	<li><a href="../symbols/jQuery.uri.html">jQuery.uri</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Class jQuery.rdf.pattern
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
			
				Represents a pattern that may or may not match a given <a href="../symbols/jQuery.rdf.triple.html">jQuery.rdf.triple</a>.
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/jquery.rdf.js.html">jquery.rdf.js</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jQuery.rdf.pattern.">
				<caption>Class Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/jQuery.rdf.pattern.html#constructor">jQuery.rdf.pattern</a></b>(subject, property, value, options)
							</div>
							<div class="description"><p>Creates a new jQuery.rdf.pattern object.</div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class jQuery.rdf.pattern.">
					<caption>Field Summary</caption>
					<thead>
						<tr>
							<th scope="col">Field Attributes</th>
							<th scope="col">Field Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/jQuery.rdf.pattern.html#object">object</a></b>
								</div>
								<div class="description">The placeholder for the object of triples matching against this pattern.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/jQuery.rdf.pattern.html#optional">optional</a></b>
								</div>
								<div class="description">Whether the pattern should only optionally match against the triple</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/jQuery.rdf.pattern.html#property">property</a></b>
								</div>
								<div class="description">The placeholder for the property of triples matching against this pattern.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">
								<b><a href="../symbols/jQuery.rdf.pattern.html#subject">subject</a></b>
								</div>
								<div class="description">The placeholder for the subject of triples matching against this pattern.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jQuery.rdf.pattern.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/jQuery.rdf.pattern.html#exec">exec</a></b>(triple)
								</div>
								<div class="description">Creates a new Object holding variable bindings by matching the passed triple against this pattern.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/jQuery.rdf.pattern.html#fill">fill</a></b>(bindings)
								</div>
								<div class="description">Creates a new <a href="../symbols/jQuery.rdf.pattern.html">jQuery.rdf.pattern</a> with any variable placeholders within this one's subject, property or object filled in with values from the bindings passed as the argument.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/jQuery.rdf.pattern.html#isFixed">isFixed</a></b>()
								</div>
								<div class="description">Tests whether this pattern has any variable placeholders in it or not.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/jQuery.rdf.pattern.html#toString">toString</a></b>()
								</div>
								<div class="description">Returns a string representation of the pattern by concatenating the subject, property and object.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/jQuery.rdf.pattern.html#triple">triple</a></b>(bindings)
								</div>
								<div class="description">Creates a new triple based on the bindings passed to the pattern, if possible.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			
<!-- ============================== events summary ======================== -->
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Class Detail
				</div>
				
				<div class="fixedFont">
						<b>jQuery.rdf.pattern</b>(subject, property, value, options)
				</div>
				
				<div class="description">
					<p>Creates a new jQuery.rdf.pattern object. This should be invoked as a method rather than constructed using new; indeed you will not usually want to generate these objects directly, since they are automatically created from strings where necessary, such as by <a href="../symbols/jQuery.rdf.html#where">jQuery.rdf#where</a>.</p>
					
				</div>
				
				
				
				<pre class="code">pattern = $.rdf.pattern('?person', $.rdf.type, 'foaf:Person', { namespaces: { foaf: "http://xmlns.com/foaf/0.1/" }});</pre>
				
				<pre class="code">
pattern = $.rdf.pattern('?person a foaf:Person', { 
  namespaces: { foaf: "http://xmlns.com/foaf/0.1/" }, 
  optional: true 
});</pre>
				
				
				
				
					
						<dl class="detailList">
						<dt class="heading">Parameters:</dt>
						
							<dt>
								<span class="light fixedFont">{String|<a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a>|<a href="../symbols/jQuery.rdf.blank.html">jQuery.rdf.blank</a>}</span>  <b>subject</b>
								
							</dt>
								<dd>The subject pattern, or a single string that defines the entire pattern. If the subject is specified as a string, it can be a fixed resource (<code>&lt;<var>uri</var>&gt;</code> or <code><var>curie</var></code>), a blank node (<code>_:<var>id</var></code>) or a variable placeholder (<code>?<var>name</var></code>).</dd>
						
							<dt>
								<span class="light fixedFont">{String|<a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a>}</span>  <b>property</b>
								<i>Optional</i>
							</dt>
								<dd>The property pattern. If the property is specified as a string, it can be a fixed resource (<code>&lt;<var>uri</var>&gt;</code> or <code><var>curie</var></code>) or a variable placeholder (<code>?<var>name</var></code>).</dd>
						
							<dt>
								<span class="light fixedFont">{String|<a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a>|<a href="../symbols/jQuery.rdf.blank.html">jQuery.rdf.blank</a>|<a href="../symbols/jQuery.rdf.literal.html">jQuery.rdf.literal</a>}</span>  <b>value</b>
								<i>Optional</i>
							</dt>
								<dd>The value pattern. If the property is specified as a string, it can be a fixed resource (<code>&lt;<var>uri</var>&gt;</code> or <code><var>curie</var></code>), a blank node (<code>_:<var>id</var></code>), a literal (<code>"<var>value</var>"</code>) or a variable placeholder (<code>?<var>name</var></code>).</dd>
						
							<dt>
								<span class="light fixedFont">{Object}</span>  <b>options</b>
								<i>Optional</i>
							</dt>
								<dd>Initialisation of the pattern.</dd>
						
							<dt>
								<span class="light fixedFont">{Object}</span>  <b>options.namespaces</b>
								<i>Optional</i>
							</dt>
								<dd>An object representing a set of namespace bindings used when interpreting the CURIEs in the subject, property and object.</dd>
						
							<dt>
								<span class="light fixedFont">{String|<a href="../symbols/jQuery.uri.html">jQuery.uri</a>}</span>  <b>options.base</b>
								<i>Optional</i>
							</dt>
								<dd>The base URI used to interpret any relative URIs used within the subject, property and object.</dd>
						
							<dt>
								<span class="light fixedFont">{boolean}</span>  <b>options.optional</b>
								<i>Optional</i>
							</dt>
								<dd></dd>
						
						</dl>
					
					
					
					
						<dl class="detailList">
						<dt class="heading">Throws:</dt>
						
							<dt>
								<span class="light fixedFont">{String}</span>  <b></b>
							</dt>
								<dd>Errors if any of the strings are not in a recognised format.</dd>
						
						</dl>
					
					
						<dl class="detailList">
						<dt class="heading">Returns:</dt>
						
								<dd><span class="light fixedFont">{<a href="../symbols/jQuery.rdf.pattern.html">jQuery.rdf.pattern</a>}</span> The newly-created pattern.</dd>
						
						</dl>
					
					
					
						<dl class="detailList">
						<dt class="heading">See:</dt>
						
							<dd><a href="../symbols/jQuery.rdf.html#where">jQuery.rdf#where</a></dd>
						
							<dd><a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a></dd>
						
							<dd><a href="../symbols/jQuery.rdf.blank.html">jQuery.rdf.blank</a></dd>
						
							<dd><a href="../symbols/jQuery.rdf.literal.html">jQuery.rdf.literal</a></dd>
						
						</dl>
					

			</div>
			

<!-- ============================== field details ========================== -->		
			
				<div class="sectionTitle">
					Field Detail
				</div>
				
					<a name="object"> </a>
					<div class="fixedFont">
					
					<span class="light">{String|<a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a>|<a href="../symbols/jQuery.rdf.blank.html">jQuery.rdf.blank</a>|<a href="../symbols/jQuery.rdf.literal.html">jQuery.rdf.literal</a>}</span>
					<b>object</b>
					
					</div>
					<div class="description">
						The placeholder for the object of triples matching against this pattern.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="optional"> </a>
					<div class="fixedFont">
					
					<span class="light">{boolean}</span>
					<b>optional</b>
					
					</div>
					<div class="description">
						Whether the pattern should only optionally match against the triple
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="property"> </a>
					<div class="fixedFont">
					
					<span class="light">{String|<a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a>}</span>
					<b>property</b>
					
					</div>
					<div class="description">
						The placeholder for the property of triples matching against this pattern.
						
						
					</div>
					
					

						
						
						
						

					<hr />
				
					<a name="subject"> </a>
					<div class="fixedFont">
					
					<span class="light">{String|<a href="../symbols/jQuery.rdf.resource.html">jQuery.rdf.resource</a>|<a href="../symbols/jQuery.rdf.blank.html">jQuery.rdf.blank</a>}</span>
					<b>subject</b>
					
					</div>
					<div class="description">
						The placeholder for the subject of triples matching against this pattern.
						
						
					</div>
					
					

						
						
						
						

					
				
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name="exec"> </a>
					<div class="fixedFont">
					
					<span class="light">{null|Object}</span>
					<b>exec</b>(triple)
					
					</div>
					<div class="description">
						Creates a new Object holding variable bindings by matching the passed triple against this pattern.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{<a href="../symbols/jQuery.rdf.triple.html">jQuery.rdf.triple</a>}</span> <b>triple</b>
									
								</dt>
								<dd>A <a href="../symbols/jQuery.rdf.triple.html">jQuery.rdf.triple</a> for this pattern to match against.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{null|Object}</span> An object containing the bindings of variables (as specified in this pattern) to values (as specified in the triple), or <code>null</code> if the triple doesn't match the pattern.
pattern = $.rdf.pattern('?thing a ?class');
bindings = pattern.exec($.rdf.triple('<> a foaf:Person', { namespaces: ns }));
thing = bindings.thing; // the resource for this page
class = bindings.class; // a resource for foaf:Person</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="fill"> </a>
					<div class="fixedFont">
					
					<span class="light">{<a href="../symbols/jQuery.rdf.pattern.html">jQuery.rdf.pattern</a>}</span>
					<b>fill</b>(bindings)
					
					</div>
					<div class="description">
						Creates a new <a href="../symbols/jQuery.rdf.pattern.html">jQuery.rdf.pattern</a> with any variable placeholders within this one's subject, property or object filled in with values from the bindings passed as the argument.
						
						
					</div>
					
					
					
					<pre class="code">pattern = $.rdf.pattern('?thing a ?class');
// pattern2 matches all triples that indicate the classes of this page. 
pattern2 = pattern.fill({ thing: $.rdf.resource('<>') });</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>bindings</b>
									
								</dt>
								<dd>An object holding the variable bindings to be used to replace any placeholders in the pattern. These bindings are of the type held by the <a href="../symbols/jQuery.rdf.html">jQuery.rdf</a> object.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{<a href="../symbols/jQuery.rdf.pattern.html">jQuery.rdf.pattern</a>}</span> A new <a href="../symbols/jQuery.rdf.pattern.html">jQuery.rdf.pattern</a> object.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="isFixed"> </a>
					<div class="fixedFont">
					
					<span class="light">{boolean}</span>
					<b>isFixed</b>()
					
					</div>
					<div class="description">
						Tests whether this pattern has any variable placeholders in it or not.
						
						
					</div>
					
					
					
					<pre class="code">$.rdf.pattern('?thing a ?class').isFixed(); // false
$.rdf.pattern('<> a foaf:Person', { namespaces: ns }).isFixed(); // true</pre>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{boolean}</span> True if the pattern doesn't contain any variable placeholders.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="toString"> </a>
					<div class="fixedFont">
					
					<span class="light">{String}</span>
					<b>toString</b>()
					
					</div>
					<div class="description">
						Returns a string representation of the pattern by concatenating the subject, property and object.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{String}</span> </dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="triple"> </a>
					<div class="fixedFont">
					
					<span class="light">{null|<a href="../symbols/jQuery.rdf.triple.html">jQuery.rdf.triple</a>}</span>
					<b>triple</b>(bindings)
					
					</div>
					<div class="description">
						Creates a new triple based on the bindings passed to the pattern, if possible.
						
						
					</div>
					
					
					
					<pre class="code">pattern = $.rdf.pattern('?thing a ?class');
// triple is a new triple '<> a foaf:Person'
triple = pattern.triple({ 
  thing: $.rdf.resource('<>'),
  class: $.rdf.resource('foaf:Person', { namespaces: ns }) 
});</pre>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Object}</span> <b>bindings</b>
									
								</dt>
								<dd>An object holding the variable bindings to be used to replace any placeholders in the pattern. These bindings are of the type held by the <a href="../symbols/jQuery.rdf.html">jQuery.rdf</a> object.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{null|<a href="../symbols/jQuery.rdf.triple.html">jQuery.rdf.triple</a>}</span> A new <a href="../symbols/jQuery.rdf.triple.html">jQuery.rdf.triple</a> object, or null if not all the variable placeholders in the pattern are specified in the bindings. The <a href="../symbols/jQuery.rdf.triple.html#source">jQuery.rdf.triple#source</a> of the generated triple is set to the string value of this pattern.</dd>
							
							</dl>
						
						
						

					
				
			
			
<!-- ============================== event details ========================= -->		
			
			
			<hr />
		</div>

		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			
			Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.0 on Tue Jul 14 2009 19:56:45 GMT+0100 (BST)
		</div>
	</body>
</html>
